﻿namespace MvcScriptManager
{
    using Yahoo.Yui.Compressor;

    /// <summary>
    /// YUI JavaScript Compressor.
    /// </summary>
    public class YuiJavaScriptCompressor : IScriptMinifier
    {
        /// <summary>
        /// Compresses the specified script source.
        /// </summary>
        /// <param name="source">The script source.</param>
        /// <returns>The compressed script content.</returns>
        public string Minify(string source)
        {
            return JavaScriptCompressor.Compress(source, false);
        }
    }
}
